﻿using System;
using System.Collections.Generic;
using System.Text;
using Surging.Core.CPlatform.Ioc;
using Surging.Core.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes;
using Dora.Tools.Utility.Const;
using System.Threading.Tasks;
using Dora.Services.AdminUser.Entities;
using Surging.Core.Common;

namespace Dora.Services.AdminUser.IApplication
{
    /// <summary>
    /// 参数映射表接口
    /// </summary>
    [ServiceBundle("api/" + DoraModuleName.AdminUser + "/{Service}")]
    public interface IParamsMapService : IServiceKey
    {
        /// <summary>
        /// 根据参数以及参数类型获取表信息
        /// </summary>
        /// <param name="Params"></param>
        /// <param name="Type"></param>
        /// <returns></returns>
        [Service(Date = "2019-10-24", Director = "ZPD", Name = "根据参数以及参数类型获取表信息")]
        Task<ParamsMapEntity> GetInfoByParams(ParamsMapEntity entity);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-10-24", Director = "ZPD", Name = "创建")]
        Task<ResultDto<int>> Create(ParamsMapEntity entity);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-10-24", Director = "ZPD", Name = "修改")]
        Task<bool> Update(ParamsMapEntity entity);

        /// <summary>
        /// 根据Id获取一个实体对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-10-24", Director = "ZPD", Name = "根据Id获取一个实体对象")]
        Task<ParamsMapEntity> GetById(int id);
    }
}
